import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Login from '../pages/Login'
import Index from '../pages/Index';
import UserManage from '../pages/UserManage'
import SoftManage from '../pages/SoftManage'
import SystemManage from '../pages/SystemManage'
import Manager from '../pages/Manager'
import Inform from '../pages/Inform'
import DynamicManage from '../pages/DynamicManage'
import DigitalManage from '../pages/DigitalManage'
import DevloperManage from '../pages/DevloperManage'
import CheckManage from '../pages/CheckManage'
import AdvertiseManage from '../pages/AdvertiseManage'
import Online from '../pages/Online'
import Offline from '../pages/Offline'
import onloadDetails from '../pages/onloadDetails'
import likeDetails from '../pages/likeDetails'
import Type from '../pages/Type'
import Brand from '../pages/Brand'
import Information from '../pages/Information'
import Param from '../pages/Param'
import Deal from '../pages/Deal'
import Img from '../pages/Img'
import Sujet from '../pages/Sujet'
import Commend from '../pages/Commend'
import InformType from '../pages/InformType'
import InformMassage from '../pages/InformMassage'
import DealedMassage from '../pages/DealedMassage'
import SoftType from '../pages/SoftType'
import CheckedErr from '../pages/CheckedErr'
import CheckedDevErr from '../pages/CheckedDevErr'

import Remark from '../pages/Remark'
import SujetContent from '../pages/SujetContent'
import Normal from '../pages/Normal'
import Forbidden from '../pages/Forbidden'
import CheckedSoft from '../pages/CheckedSoft'
import CheckedDevlop from '../pages/CheckedDevlop'
import Reply from '../pages/Reply'
Vue.use(Router)

export default new Router({
  mode:'history',
  routes: [
    {
      path:'/',
      name:'登陆页',
      component:Login
    },
    {
      path: '/index',
      name: '主页',
      component: Index,
      redirect: { name: '用户管理' },
      children:[
        {
          path: 'user',
          name: '用户管理',
          component: UserManage,
          children:[
            {
              path: 'onload',
              name: '下载',
              component: onloadDetails
            },
            {
              path: 'like',
              name: '收藏',
              component: likeDetails
            },
          ]
        },
        {
          path: 'soft',
          name: '软件管理',
          component: SoftManage,
          children:[
              {
                path: 'online',
                name: '上线',
                component: Online
              },
              {
                path: 'offline',
                name: '下线',
                component: Offline
              },
              {
                path: 'softType',
                name: '软件类型',
                component: SoftType
              },
          ]
        },
        {
          path: 'devloper',
          name: '开发者管理',
          component: DevloperManage,
          children:[
            {
              path: 'normal',
                name: '正常',
                component: Normal
            },
            {
              path: 'forbidden',
                name: '禁用',
                component: Forbidden
            }
          ]
        },
        {
          path: 'digital',
          name: '数码管理',
          component: DigitalManage,
          children:[
            {
              path: 'type',
              name: '类型',
              component: Type
            },
            {
              path: 'brand',
              name: '品牌',
              component: Brand
            },
            {
              path: 'information',
              name: '信息',
              component: Information
            },
            {
              path: 'param',
              name: '参数',
              component: Param
            },
            {
              path: 'img',
              name: '图片',
              component: Img
            },
          ]
        },
        {
          path: 'manager',
          name: '管理员管理',
          component: Manager
        },
        {
          path: 'dynamic',
          name: '动态',
          component: DynamicManage,
          children:[
            {
              path: 'sujet',
              name: '话题',
              component: Sujet,
            children:[
              {
                path:'sujetContent/:id',
                name:'话题内容',
                component:SujetContent,
                children:[
                 {
                  path: 'reply/:id',
                  name: '回复',
                  component: Reply,
                 }
                ]
              },
            ]
            },
       
            {
              path: 'deal',
              name: '交易',
              component: Deal
            },
            {
              path: 'commend',
              name: '评论',
              component: Commend
            },
            
            {
              path: 'remark',
              name: '点评',
              component: Remark
            }
          ]
        },
        {
          path: 'advertise',
          name: '广告',
          component: AdvertiseManage
        },
        {
          path: 'check',
          name: '审核',
          component: CheckManage,
          children:[
            {
              path: 'checkSoft',
              name: '软件审核',
              component: CheckedSoft,
              children:[
                {
                  path: 'checkErr',
                  name: '不通过',
                  component: CheckedErr
                },
              ]
            },
            {
              path: 'checkDevlop',
              name: '开发者审核',
              component: CheckedDevlop,
              children:[
                {
                  path: 'checkDevErr',
                  name: '不通过',
                  component: CheckedDevErr
                },
              ]
            },
          ]
        },
        {
          path: 'inform',
          name: '举报',
          component: Inform,
          children:[
            {
              path: 'types',
              name: '举报类型',
              component: InformType
            },
            {
              path: 'massage',
              name: '举报信息',
              component: InformMassage,
              children:[
                {
                  path: 'dealed',
                  name: '已处理',
                  component: DealedMassage
                },
              ]
            },
          ]
        },
        {
          path: 'system',
          name: '系统',
          component: SystemManage
        },
        
      ]
    }
  ]
})
